package org.tis.tools.abf.module.om.entity.vo;

import lombok.Data;
import org.tis.tools.abf.module.common.entity.enums.YON;
import org.tis.tools.abf.module.om.entity.OmPosition;
import org.tis.tools.abf.module.om.entity.enums.OmPositionStatus;
import org.tis.tools.abf.module.om.entity.enums.OmPositionType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by chenchao
 * Created on 2018/6/5 21:27
 */
@Data
public class OmPositionDetail implements Serializable {

    /** serialVersionUID */
    private static final long serialVersionUID = 1L;

    private String guid;

    private String guidMapping;

    private String positionCode;

    private String positionName;

    private OmPositionType positionType;

    private OmPositionStatus positionStatus;

    private YON isleaf;

    private BigDecimal subCount;

    private BigDecimal positionLevel;

    private String positionSeq;

    private String guidParents;

    private Date startDate;

    private Date endDate;

    private List<OmPosition> children = new ArrayList<OmPosition>();


    public  OmPositionDetail(){}

    public OmPositionDetail(OmPosition omPosition,List<OmPosition> children){
            this.guid = omPosition.getGuid();
            this.guidMapping = omPosition.getGuidMapping();
            this.positionCode = omPosition.getPositionCode();
            this.positionName = omPosition.getPositionName();
            this.positionType = omPosition.getPositionType();
            this.positionStatus = omPosition.getPositionStatus();
            this.isleaf = omPosition.getIsleaf();
            this.subCount = omPosition.getSubCount();
            this.positionLevel = omPosition.getPositionLevel();
            this.positionSeq = omPosition.getPositionSeq();
            this.guidParents = omPosition.getGuidParents();
            this.startDate = omPosition.getStartDate();
            this.endDate = omPosition.getEndDate();
            this.children = children;
    }
}
